module.exports = {
    publicPath: "./",
    outputDir: "dist", //构建时输出的目录
    assetsDir: "staic", //放置静态资源目录
    indexPath: "index.html", //html 输出路径
    filenameHashing: true, //文件名哈希值
    pages: {
        index: {
            entry: "src/main.js", //page 入口文件
            template: "index.html", //模板文件
            filename: "index.html", //在dist/index.html 的输出文件
            title: "支付",
        },
    },
    configureWebpack: {},
    devServer: {
        // open: process.platform === 'darwin',
        host: "0.0.0.0",
        port: 8060,
        open: true, //配置自动启动浏览器
        proxy: {
            "/api": {
                target: "http://117.160.141.25:8037", //对应服务器的接口
                changeOrigin: true,
                // ws: true,
                pathRewrite: {
                    "^/api": "/",
                },
            }
        },
    },
    css: {
        loaderOptions: {
            postcss: {
                plugins: [
                    require('postcss-pxtorem')({ // 把px单位换算成rem单位
                        rootValue: 75, // 换算的基数(设计图750的根字体为75)
                        propList: ['*']
                    })
                ]
            }
        },
    },

}